<template>
	<view>


		<!-- 操作菜单 -->
		
		<paper-left-popup 
						:show="show"
						@hide="hidepopup"
						@addfriend="addfriend"
						@clear="clear">
		</paper-left-popup>
		
		
		
		<!-- paper 组件 -->
		<!-- 小纸条列表 -->
		<!-- 小纸条列表 -->
		<block v-for="(item,index) in list" :key="index">

			<PaperList :item="item" :index="index"></PaperList>
		</block>






	</view>
</template>

<script>
	import PaperList from "../../components/paper/paper-list.vue";
	import LoadMore from "../../components/common/load-more.vue";
	
		import paperLeftPopup from "../../components/paper/paper-left-popup.vue";
	export default {
		components: {
			PaperList,
			LoadMore,
			paperLeftPopup
		},
		data() {
			return {
				show: false,

				loadtext: "上拉加载更多",
				list: [{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 2
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 0
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 0
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 11
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 2
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 0
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 0
					},
					{
						userpic: "../../static/demo/userpic/12.jpg",
						username: "昵称",
						time: "10:21",
						data: "我是信息",
						noreadnum: 11
					}
				]

			}
		},
		methods: {

			//这个方法是显示下拉菜单

			addfriend() {
				console.log('加糗友')
				this.hidepopup()
			},

			clear() {
				console.log("清除缓存");
				this.hidepopup();

			},

			hidepopup() {
				this.show = false;
			},

			showpopup() {
				this.show = true;
			},



		},


		// 监听导航按钮点击事件
		onNavigationBarButtonTap(e) {
			switch (e.index) {
				case 0:
					console.log('点击了左边按钮')
					this.hidepopup()
					break;
				case 1: //  等于1 表示点击了右边

					this.showpopup()
					break;
			}
		}

	}
</script>

<style>
	.body {
		padding: 0 20upx;
	}
	
	
	
	

</style>
